<!DOCTYPE html>
<html lang="zh-CN">
<meta charset="utf-8" />
<head>
<title>分配优质媒体 <?php echo $this->config->item('title');?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet"	href="<?php echo base_url()?>public/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo base_url()?>public/css/style.css">
<link rel="stylesheet" href="<?php echo base_url()?>public/css/bootstrap-select.min.css">
</head>
<body>
	<script src="<?php echo base_url()?>public/js/jquery-2.0.2.min.js"></script>
	<script src="<?php echo base_url()?>public/js/bootstrap.min.js"></script>
	<script src="<?php echo base_url()?>public/js/bootstrap-confirm.js"></script>
	<script src='<?php echo base_url()?>public/js/bootbox.min.js'></script>
	<script src='<?php echo base_url()?>public/js/jquery.form.js'></script>
	<script src='<?php echo base_url()?>public/js/ssi_common.js'></script>
	<script src='<?php echo base_url()?>public/js/bootstrap-select.min.js'></script>
	<script type="text/javascript">
	jQuery(function($) {

		$('.selectpicker').selectpicker();

		$('#main_from').ajaxForm({
			dataType:  'json',
			beforeSubmit:  showRequest,
			success:   processJson
		});
	
		function showRequest(formData, jqForm, options) {
		}
	
		function processJson(data) {
			if (data.result==false) {
				bootbox.alert(data.message, function() {
				});
				$('button[type="button"]').removeClass('disabled');
			}else{
				window.location.href=data.redirect_url;
			}
		}
	});
	</script>
	<div role="navigation" class="navbar navbar-inverse navbar-fixed-top">
		<div class="container">
			<div class="navbar-header">
				<a class="navbar-brand">SSI后台管理系统</a>
			</div>
			<div class="collapse navbar-collapse navbar-right">
				<ul class="nav navbar-nav">
					<li><a href="<?php echo base_url()?>" class="navbar-link">首页</a></li>
					<li><a href="<?php echo base_url()."index.php/common_login_user_set"?>" class="navbar-link">超级管理员</a></li>
					<li><a href="<?php echo base_url()?>index.php/common_login_manage/logout" class="navbar-link">退出</a></li>
				</ul>
			</div>
		</div>
	</div>
	<div class="container">
		<div class="row">
			<div class="col-xs-3">
				<?php echo $user_menu?>
			</div>
			<div class="col-md-9">
				<div class="panel panel-default">
					<div class="panel-heading">分配优质媒体</div>
					<div class="panel-body">
						<form method="post" enctype="multipart/form-data" id="main_from1" action="<?php echo base_url()."index.php"?>/media_env_urban_manage/save_assgin_excellent_media"
							class="form-horizontal">
							<div id="env_name" class="form-group">
								<label for="env_name" class="control-label col-sm-3">商圈名称</label>
								<div class="col-sm-5">
									<p class='form-control-static'>
									<?php echo $env_urban_info['env_name']?>
									</p>
								</div>
							</div>
							<div class="form-group">
								<label for="location" class="control-label col-sm-3">优质常规大牌编号</label>
								<div class="col-sm-5">
									<p class='form-control-static'>
									<select showSubtext='true' class='span5 selectpicker form-control' data-live-search='true' multiple  name='common_media[]'>
									<?php if ($common_media_list!=null) {
										foreach ($common_media_list as $common_media){?>
										<option value="<?php echo $common_media['media_id']?>"
										<?php if ($common_excellent_media_list !=null) {
											foreach ($common_excellent_media_list as $common_excellent_media){
												if ($common_excellent_media['media_id']== $common_media['media_id']) {
													echo 'selected="selected"';
												}
											}
										}?>
										><?php echo $common_media['media_id']?></option>
									<?php }
									}?>
									</select>
									</p>
								</div>
							</div>
							<div class="form-group">
								<label for="location" class="control-label col-sm-3">优质LED大牌编号</label>
								<div class="col-sm-5">
									<p class='form-control-static'>
									<select showSubtext='true' class='span5 selectpicker form-control' data-live-search='true' multiple  name='led_media[]'>
									<?php if ($led_media_list!=null) {
										foreach ($led_media_list as $led_media){?>
										<option value="<?php echo $led_media['media_id']?>"<?php if ($led_excellent_media_list !=null) {
											foreach ($led_excellent_media_list as $led_excellent_media){
												if ($led_excellent_media['media_id']== $led_media['media_id']) {
													echo 'selected="selected"';
												}
											}
										}?>><?php echo $led_media['media_id']?></option>
									<?php }
									}?>
									</select>
									</p>
								</div>
							</div>
							<input type="hidden" name="env_id" value="<?php echo $env_id?>">
							<input type="hidden" name="env_type" value="<?php echo $env_type?>">
							<div class="form-group">
								<div class="col-sm-offset-3 col-sm-10">
									<button type="submit" onclick='from_check_login($("#main_from"),"<?php echo base_url()?>")' class="btn btn-primary">编辑</button>
									<a href="javascript:void()" onclick='history.back()' >返回</a>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
<div  class="back-to" id="toolBackTop">
	<a title="返回顶部" onclick="window.scrollTo(0,0);return false;" href="#top" class="back-top">
	返回顶部</a>
	<a title="返回底部" onclick="window.scrollTo(0,document.body.scrollHeight);return false;" href="#bottom" class="back-bottom">
	返回底部</a>
</div>
</body>
</html>
